import httpInstance from "@/utils/http"

export function sendCode(account){
    return httpInstance({
        method:"get",
        url:"/user/code/" + account
    })
}

export function login(account,password){
    return httpInstance({
        method:"post",
        url:"/user/login",
        data:{
            phone:account,
            password:password
        }
    })
}

export function logout(){
    return httpInstance({
        method:"post",
        url:"/user/logout"
    })
}

export function loginCode(account,code){
    return httpInstance({
        method:"post",
        url:"/user/login",
        data:{
            phone:account,
            code:code
        }
    })
}
